/**
 * Created by wang on 2016-1-16.
 * 友盟提供的访问统计
 */
define(['angular'], function (angular) {
    "use strict";

    var directive = function () {
        return {
            restrict: "A",
            link: function( scope, element, attrs) {
                element.bind( "click", function() {
                    if(attrs.key && typeof Messenger != 'undefined') {
                        Messenger.sendMsg("ym_event",{eventID:attrs.key},null,null);
                    }
                });
            }
        }
    };

    directive.$inject = [];
    return directive;
});